package common;

import com.alibaba.fastjson.JSON;

public class BeanUtils {
	/**
	 * 对JavaBean的查询结果进行拷贝
	 * 
	 * @author sxp
	 * @since V1.0 Nov 18, 2016
	 */
	public static <T> T deepCopy(T source, Class<T> clazz) {
		if (source == null) {
			return null;
		}

		T dest = JSON.parseObject(JSON.toJSONString(source), clazz);
		return dest;
	}

}
